/*******************************************************************************
* Copyright (C) 2019 China Micro Semiconductor Limited Company. All Rights Reserved.
*
* This software is owned and published by:
* CMS LLC, No 2609-10, Taurus Plaza, TaoyuanRoad, NanshanDistrict, Shenzhen, China.
*
* BY DOWNLOADING, INSTALLING OR USING THIS SOFTWARE, YOU AGREE TO BE BOUND
* BY ALL THE TERMS AND CONDITIONS OF THIS AGREEMENT.
*
* This software contains source code for use with CMS
* components. This software is licensed by CMS to be adapted only
* for use in systems utilizing CMS components. CMS shall not be
* responsible for misuse or illegal use of this software for devices not
* supported herein. CMS is providing this software "AS IS" and will
* not be responsible for issues arising from incorrect user implementation
* of the software.
*
* This software may be replicated in part or whole for the licensed use,
* with the restriction that this Disclaimer and Copyright notice must be
* included with each copy of this software, whether used in part or whole,
* at all times.
*/

/*****************************************************************************/
/** \file adc1.h
**
** History:
** 
*****************************************************************************/
#ifndef __ADCB_H_
#define __ADCB_H_

#ifdef __cplusplus
extern "C"
{
#endif

/*****************************************************************************/
/* Include files */
/*****************************************************************************/
#include "cms32f0301.h"
/*****************************************************************************/
/* Global pre-processor symbols/macros ('#define') */
/*****************************************************************************/
/*----------------------------------------------------------------------------
 **ADCB 参考源
-----------------------------------------------------------------------------*/
#define  ADCB_VREF_BG		(0x02UL<<ADCB_CON_ADCVS_Pos)   /*参考源选择BG 1.2V*/
#define  ADCB_VREF_VDD		(0x00UL)                       /*参考源选择VDD*/

/*----------------------------------------------------------------------------
 **ADCB 转换模式
-----------------------------------------------------------------------------*/
#define 	ADCB_MODE_HIGH		(0x00UL)						/*高速转换模式*/
#define 	ADCB_MODE_LOW		(0x03UL<<ADCB_CON_ADMODE10_Pos)	/*低电流模式*/

#define 	ADCB_CONVERT_SINGLE		(0x00UL)						/*单次模式*/
#define 	ADCB_CONVERT_CONTINUOUS		(0x01UL<<ADCB_CON_ADCMS_Pos)	/*连续模式*/

#define 	ADCB_SWITCH_HARDWARE	(0x00UL)						/*硬件自动切换模式*/
#define 	ADCB_SWITCH_SOFTWARE	(0x1UL<<ADCB_CON_ADCSWCHE_Pos)	/*软件切换模式*/

/*----------------------------------------------------------------------------
 **ADCB 时钟分频
-----------------------------------------------------------------------------*/
#define 	ADCB_CLK_DIV_1		(0x00UL)			/*ADCB 时钟分频为 1*/
#define 	ADCB_CLK_DIV_2		(0x01UL)			/*ADCB 时钟分频为 2*/
#define 	ADCB_CLK_DIV_4		(0x02UL)			/*ADCB 时钟分频为 4*/
#define 	ADCB_CLK_DIV_8		(0x03UL)			/*ADCB 时钟分频为 8*/
#define 	ADCB_CLK_DIV_16		(0x04UL)			/*ADCB 时钟分频为 16*/
#define 	ADCB_CLK_DIV_32		(0x05UL)			/*ADCB 时钟分频为 32*/
#define 	ADCB_CLK_DIV_64		(0x06UL)			/*ADCB 时钟分频为 64*/
#define 	ADCB_CLK_DIV_128	(0x07UL)			/*ADCB 时钟分频为 128*/

/*----------------------------------------------------------------------------
 **ADCB 充电、放电时间
-----------------------------------------------------------------------------*/
#define 	ADCB_CG_2			(0x02UL)				/* 2*ADCCLK*/
#define 	ADCB_CG_3			(0x03UL)				/* 3*ADCCLK*/
#define 	ADCB_CG_4			(0x04UL)				/* 4*ADCCLK*/
#define 	ADCB_CG_5			(0x05UL)				/* 5*ADCCLK*/
#define 	ADCB_CG_6			(0x06UL)				/* 6*ADCCLK*/
#define 	ADCB_CG_7			(0x07UL)				/* 7*ADCCLK*/
#define 	ADCB_CG_8			(0x08UL)				/* 8*ADCCLK*/
#define 	ADCB_CG_9			(0x09UL)				/* 9*ADCCLK*/
#define 	ADCB_CG_10			(0x0AUL)				/* 10*ADCCLK*/
#define 	ADCB_CG_11			(0x0BUL)				/* 11*ADCCLK*/
#define 	ADCB_CG_12			(0x0CUL)				/* 12*ADCCLK*/
#define 	ADCB_CG_13			(0x0DUL)				/* 13*ADCCLK*/
#define 	ADCB_CG_14			(0x0EUL)				/* 14*ADCCLK*/
#define 	ADCB_CG_15			(0x0FUL)				/* 15*ADCCLK*/

/*----------------------------------------------------------------------------
 **ADCB 参考源
-----------------------------------------------------------------------------*/
#define		ADCB_VREFP_VDD		(0x00UL)						/*选择VDD作为正端参考*/
#define		ADCB_VREFN_VSS		(0x00UL)						/*选择部VSS作为负端参考*/
/*---------------------------------------------------------------------------*/
#define		ADCB_VREFP_AVREFP	(0x01UL<<ADCB_CON_ADCVS_Pos)	/*选择外部AVREFP作为正端参考*/
#define		ADCB_VREFN_AVREFN	(0x01UL<<ADCB_CON_ADCVG_Pos)	/*选择外部AVREFN作为负端参考*/	

/*----------------------------------------------------------------------------
 **ADCB 内部触发源选择
-----------------------------------------------------------------------------*/
#define		ADCB_TG_INTNEL_ADCB				((0x1UL<<ADCB_HWTG_ADCINTTGSS_Pos)| ADCB_HWTG_ADCINTTGEN_Msk)	/*内部ADCB触发*/			
#define		ADCB_TG_INTNEL_TMR0				((0x4UL<<ADCB_HWTG_ADCINTTGSS_Pos)| ADCB_HWTG_ADCINTTGEN_Msk)	/*内部TMR0已使能中断触发*/			
#define		ADCB_TG_INTNEL_TMR1				((0x5UL<<ADCB_HWTG_ADCINTTGSS_Pos)| ADCB_HWTG_ADCINTTGEN_Msk)	/*内部TMR1已使能中断触发*/	
#define		ADCB_TG_INTNEL_TMR2				((0x6UL<<ADCB_HWTG_ADCINTTGSS_Pos)| ADCB_HWTG_ADCINTTGEN_Msk)	/*内部TMR2已使能中断触发*/			
#define		ADCB_TG_INTNEL_TMR3				((0x7UL<<ADCB_HWTG_ADCINTTGSS_Pos)| ADCB_HWTG_ADCINTTGEN_Msk)	/*内部TMR3已使能中断触发*/	

/*----------------------------------------------------------------------------
 **ADCB 采样通道
-----------------------------------------------------------------------------*/
#define		ADCB_CH_0					(0x0UL)			
#define		ADCB_CH_1					(0x1UL)	
#define		ADCB_CH_2					(0x2UL)			
#define		ADCB_CH_3					(0x3UL)			
#define		ADCB_CH_4					(0x4UL)		
#define		ADCB_CH_5					(0x5UL)			
#define		ADCB_CH_6					(0x6UL)	
#define		ADCB_CH_7					(0x7UL)			
#define		ADCB_CH_8					(0x8UL)			
#define		ADCB_CH_9					(0x9UL)		
#define		ADCB_CH_10					(0xAUL)			
#define		ADCB_CH_11					(0xBUL)	
#define		ADCB_CH_12					(0xCUL)			
#define		ADCB_CH_13					(0xDUL)			
#define		ADCB_CH_14					(0xEUL)		
#define		ADCB_CH_15					(0xFUL)			
#define		ADCB_CH_16					(0x10UL)	
#define		ADCB_CH_17					(0x11UL)			
#define		ADCB_CH_18					(0x12UL)			
#define		ADCB_CH_19					(0x13UL)
#define		ADCB_CH_20					(0x14UL)	
#define		ADCB_CH_21					(0x15UL)			
#define		ADCB_CH_22					(0x16UL)			
#define		ADCB_CH_23					(0x17UL)
#define		ADCB_CH_24					(0x18UL)
#define		ADCB_CH_25					(0x19UL)
#define		ADCB_CH_26					(0x1AUL)
#define		ADCB_CH_27					(0x1BUL)
#define		ADCB_CH_28					(0x1CUL)
#define		ADCB_CH_29					(0x1DUL)
#define		ADCB_CH_30					(0x1EUL)


#define		ADCB_CH_0_MSK				(0x1UL)			
#define		ADCB_CH_1_MSK				(0x2UL)	
#define		ADCB_CH_2_MSK				(0x4UL)			
#define		ADCB_CH_3_MSK				(0x8UL)			
#define		ADCB_CH_4_MSK				(0x10UL)		
#define		ADCB_CH_5_MSK				(0x20UL)			
#define		ADCB_CH_6_MSK				(0x40UL)	
#define		ADCB_CH_7_MSK				(0x80UL)			
#define		ADCB_CH_8_MSK				(0x100UL)			
#define		ADCB_CH_9_MSK				(0x200UL)		
#define		ADCB_CH_10_MSK				(0x400UL)			
#define		ADCB_CH_11_MSK				(0x800UL)	
#define		ADCB_CH_12_MSK				(0x1000UL)			
#define		ADCB_CH_13_MSK				(0x2000UL)			
#define		ADCB_CH_14_MSK				(0x4000UL)		
#define		ADCB_CH_15_MSK				(0x8000UL)			
#define		ADCB_CH_16_MSK				(0x10000UL)	
#define		ADCB_CH_17_MSK				(0x20000UL)			
#define		ADCB_CH_18_MSK				(0x40000UL)			
#define		ADCB_CH_19_MSK				(0x80000UL)

#define		ADCB_CH_20_MSK				(0x100000UL)			
#define		ADCB_CH_21_MSK				(0x200000UL)	
#define		ADCB_CH_22_MSK				(0x400000UL)			
#define		ADCB_CH_23_MSK				(0x800000UL)			
#define		ADCB_CH_24_MSK				(0x1000000UL)		
#define		ADCB_CH_25_MSK				(0x2000000UL)			
#define		ADCB_CH_26_MSK				(0x4000000UL)	
#define		ADCB_CH_27_MSK				(0x8000000UL)			
#define		ADCB_CH_28_MSK				(0x10000000UL)			
#define		ADCB_CH_29_MSK				(0x20000000UL)
#define		ADCB_CH_30_MSK				(0x40000000UL)


/*----------------------------------------------------------------------------
 **ADCB  AN30选择
-----------------------------------------------------------------------------*/
#define    ADCB_AN30_SEL_BG				(0x0UL)			/*内部BG*/
#define    ADCB_AN30_SEL_VSS			(0x5UL)			/*VSS*/
#define    ADCB_AN30_SEL_AVDD			(0x6UL)			/*ADC参考VDD*/
#define    ADCB_AN30_SEL_AVSS			(0x7UL)			/*ADC参考VSS*/


/*----------------------------------------------------------------------------
 **ADCB   比较
-----------------------------------------------------------------------------*/
#define		ADCB_CMP_LESS_THAN_RESULT		(0x00UL)		/*ADC 结果<预设值*/
#define		ADCB_CMP_NOT_LESS_THAN_RESULT	(0x01UL<<ADCB_CMP_ADCCMPCOND_Pos)		/*ADC 结果>=预设值*/

#define		ADCB_CMP0						(0x00UL)		/*ADCB比较器0*/
#define		ADCB_CMP1						(0x01UL)		/*ADCB比较器1*/
	

/*----------------------------------------------------------------------------
 **ADCB   写保护
-----------------------------------------------------------------------------*/
#define		ADCB_LOCK_WRITE_KEY		(0x55UL)


/*****************************************************************************
 ** \brief	ADCB_IS_BUSY
 **			获取ADCB转换结束/空闲标志位
 ** \param [in] none
 ** \return  1：忙   0：空闲/转换完成
 ** \note	 
*****************************************************************************/
#define	ADCB_IS_BUSY()		((ADCB->CON2&ADCB_CON2_ADCST_Msk)? 1:0)


/*****************************************************************************
 ** \brief	ADCB_Go
 **			开启ADCB转换
 ** \param [in] none
 ** \return  none
 ** \note	 
*****************************************************************************/
__STATIC_INLINE	void ADCB_Go(void)
{
	ADCB->LOCK = ADCB_LOCK_WRITE_KEY;
	ADCB->CON2 |= ADCB_CON2_ADCST_Msk;
	ADCB->LOCK = 0x00;
}

							
/*****************************************************************************/
/* Global type definitions ('typedef') */
/*****************************************************************************/


/*****************************************************************************/
/* Global variable declarations ('extern', definition in C source) */
/*****************************************************************************/


/*****************************************************************************/
/* Global function prototypes ('extern', definition in C source) */
/*****************************************************************************/

/*****************************************************************************
 ** \brief	ADCB_ConfigRunMode
 **			设置ADC运行模式
 ** \param [in] RunMode: (1)ADCB_MODE_HIGH
 **						 (2)ADCB_MODE_LOW
 **				ConvertMode:(1)ADCB_CONVERT_SINGLE			
 **							(2)ADCB_CONVERT_CONTINUOUS				
 **				ClkDiv :(1)ADCB_CLK_DIV_1
 **						(2)ADCB_CLK_DIV_2
 **						(3)ADCB_CLK_DIV_4
 **						(4)ADCB_CLK_DIV_8
 **						(5)ADCB_CLK_DIV_16
 **						(6)ADCB_CLK_DIV_32
 **						(7)ADCB_CLK_DIV_64
 **						(8)ADCB_CLK_DIV_128
 **				Holdtime: 5~255 		
 ** \return  none
 ** \note	
*****************************************************************************/
void ADCB_ConfigRunMode(uint32_t RunMode, uint32_t ConvertMode,uint32_t ClkDiv, uint32_t Holdtime);

/*****************************************************************************
 ** \brief	ADCB_ConfigChannelSwitchMode
 **			设置ADCB通道切换模式
 ** \param [in] 	ChSwitch:(1)ADCB_SWITCH_HARDWARE	
 **							 (2)ADCB_SWITCH_SOFTWARE 
 ** \return  none
 ** \note	
*****************************************************************************/
void ADCB_ConfigChannelSwitchMode(uint32_t ChSwitch);

/*****************************************************************************
 ** \brief	ADCB_EnableCharge
 **			开启ADCB充电功能
 ** \param [in] ChargeTime:	ADCB_CG_2...... ADCB_CG_30
 ** \return  none
 ** \note	
*****************************************************************************/
void ADCB_EnableCharge(uint32_t ChargeTime);
/*****************************************************************************
 ** \brief	ADCB_EnableDischarge
 **			开启ADCB放电功能
 ** \param [in] ChargeTime:	ADCB_CG_2...... ADCB_CG_30
 ** \return  none
 ** \note	
*****************************************************************************/
void ADCB_EnableDischarge(uint32_t ChargeTime);

/*****************************************************************************
 ** \brief	ADCB_DisableChargeAndDischarge
 **			关闭ADCB放电、充电功能
 ** \param [in] none
 ** \return  none
 ** \note	
*****************************************************************************/
void ADCB_DisableChargeAndDischarge(void);

/*****************************************************************************
 ** \brief	ADCB_ConfigVREF
 **			设置ADCB的参考源
 ** \param [in]  VrefPos:  (1)ADCB_VREFP_VDD		选择VDD作为正端参考
 **						   (2)ADCB_VREFP_AVREFP		选择外部AVREFP作为正端参考
 **				 VrefNeg:  (1)ADCB_VREFN_VSS		选择部VSS作为负端参考
 **						   (2)ADCB_VREFN_AVREFN		选择外部AVREFN作为负端参考	
 ** \return  none
 ** \note	
*****************************************************************************/
void ADCB_ConfigVREF(uint32_t VrefPos, uint32_t VrefNeg);


/*****************************************************************************
 ** \brief	ADCB_ConfigSampleTime
 **			配置采样时间
 ** \param [in]  sampletime: 5 ~ 255;
 ** \return  none
 ** \note	
*****************************************************************************/
void ADCB_ConfigSampleTime(uint32_t sampletime);

/*****************************************************************************
 ** \brief	ADCB_EnableSampleWait
 **			使能ADCB保持采样状态
 ** \param [in]  none
 ** \return  none
 ** \note	
*****************************************************************************/
void ADCB_EnableSampleWait(void);
/*****************************************************************************
 ** \brief	ADCB_DisableSampleWait
 **			关闭ADCB保持采样状态
 ** \param [in]  none
 ** \return  none
 ** \note	
*****************************************************************************/
void ADCB_DisableSampleWait(void);

/*****************************************************************************
 ** \brief	ADCB_SelSoftwareSwitchChannel
 **			选择软件切换转换的通道
 ** \param [in] Channel: ADCB_CH_0 ~ ADCB_CH_30
 ** \return  none
 ** \note	
*****************************************************************************/
void ADCB_SelSoftwareSwitchChannel(uint32_t Channel);

/*****************************************************************************
 ** \brief	ADCB_EnableScanChannel
 **			开启ADC转换通道
 ** \param [in] ChannelMask: ADCB_CH_0_MSK ~ ADCB_CH_19_MSK
 ** \return  none
 ** \note	
*****************************************************************************/
void ADCB_EnableScanChannel(uint32_t ChannelMask);

/*****************************************************************************
 ** \brief	ADCB_AN30Select
 **			AN30通道选择
 ** \param [in] AN30Sel : (1)ADCB_AN30_SEL_BG
 **						  (6)ADCB_AN30_SEL_VSS
 **						  (7)ADCB_AN30_SEL_AVDD
 **						  (8)ADCB_AN30_SEL_AVSS
 ** \return  none
 ** \note	
*****************************************************************************/
void ADCB_AN30Select(uint32_t AN30Sel);

/*****************************************************************************
 ** \brief	ADCB_DisableScanChannel
 **			关闭ADCB转换通道
 ** \param [in] ChannelMask: ADCB_CH_0_MSK ~ ADCB_CH_19_MSK
 ** \return  none
 ** \note	
*****************************************************************************/
void ADCB_DisableScanChannel(uint32_t ChannelMask);

/*****************************************************************************
 ** \brief	ADCB_GetResult
 **			获取ADCB转换结果
 ** \param [in] Channel: ADCB_CH_0 ~ ADCB_CH_30
 ** \return  12 bits Value
 ** \note	
*****************************************************************************/
uint32_t ADCB_GetResult(uint32_t Channel);

/*****************************************************************************
 ** \brief	ADCB_EnableHardwareTrigger
 **			开启硬件触发ADCB转换功能
 ** \param [in] TriggerSource: 
 **							(1)ADCB_TG_INTNEL_ADCB
 **							(2)ADCB_TG_INTNEL_TMR0
 **							(3)ADCB_TG_INTNEL_TMR1 
 **							(4)ADCB_TG_INTNEL_TMR2
 **							(5)ADCB_TG_INTNEL_TMR3	
 ** \return  none
 ** \note	
*****************************************************************************/
void ADCB_EnableHardwareTrigger(uint32_t TriggerSource);
/*****************************************************************************
 ** \brief	ADCB_DisableHardwareTrigger
 **			关闭硬件触发ADCB转换功能
 ** \param [in] TriggerSource: 
 **							(1)ADCB_TG_INTNEL_ADCB
 **							(2)ADCB_TG_INTNEL_TMR0
 **							(3)ADCB_TG_INTNEL_TMR1
 **							(4)ADCB_TG_INTNEL_TMR2
 **							(5)ADCB_TG_INTNEL_TMR3	
 ** \return  none
 ** \note	
*****************************************************************************/
void ADCB_DisableHardwareTrigger(uint32_t TriggerSource);
/*****************************************************************************
 ** \brief	ADCB_SetAnalogSwitchDelayTime
 **			设置ADCB 模拟开关打开到开始采样的时间
 ** \param [in] DelayTime: 0x00~ 0xff;
 ** \return  none
 ** \note  Time = (DelayTime+2)*ADCCLK
*****************************************************************************/
void ADCB_SetAnalogSwitchDelayTime(uint32_t DelayTime);

/*****************************************************************************
 ** \brief	ADCB_EnableCompare
 **			开启ADCB比较功能
 ** \param [in] Compare : ADCB_CMP0 、ADCB_CMP1
 ** \return  none
 ** \note	
*****************************************************************************/
void ADCB_EnableCompare(uint32_t Compare);
/*****************************************************************************
 ** \brief	ADCB_DisableCompare
 **			关闭ADCB比较功能
 ** \param [in] Compare : ADCB_CMP0 、ADCB_CMP1
 ** \return  none
 ** \note	
*****************************************************************************/
void ADCB_DisableCompare(uint32_t Compare);
/*****************************************************************************
 ** \brief	ADCB_ConfigCompare
 **			配置ADCB比较功能
 ** \param [in]  Compare : ADCB_CMP0 、ADCB_CMP1
 **				 CmpMode:(1)ADCB_CMP_LESS_THAN_RESULT
 **						 (2)ADCB_CMP_NOT_LESS_THAN_RESULT
 **				 CmpCount: 0x00~0xf  预设比较次数
 **				 CmpChannel: ADCB_CH_0 ~ ADCB_CH_30
 **				 CmpData : 12 bit 比较值
 ** \return  none
 ** \note	当内部计数器等于ADCCMPxMCNT+1的值时产生ADC比较事件。
*****************************************************************************/
void ADCB_ConfigCompare(uint32_t Compare, uint32_t CmpMode, uint32_t CmpCount,  
						uint32_t CmpChannel, uint32_t CmpData);

/*****************************************************************************
 ** \brief	ADCB_GetCompareResult
 **			获取ADCB比较器结果
 ** \param [in] Compare : ADCB_CMP0 、ADCB_CMP1
 ** \return  1 /0
 ** \note	
*****************************************************************************/
uint32_t ADCB_GetCompareResult(uint32_t Compare);


/*****************************************************************************
 ** \brief	ADCB_Start
 **			开启ADCB
 ** \param [in] none
 ** \return  none
 ** \note	
*****************************************************************************/
void ADCB_Start(void);
/*****************************************************************************
 ** \brief	ADCB_Stop
 **			关闭ADCB
 ** \param [in] none
 ** \return  none
 ** \note	
*****************************************************************************/
void ADCB_Stop(void);

/*****************************************************************************
 ** \brief	ADCB_EnableReset
 **			复位ADCB
 ** \param [in] none
 ** \return  none
 ** \note	
*****************************************************************************/
void ADCB_EnableReset(void);

/*****************************************************************************
 ** \brief	ADCB_EnableCompareInt
 **			开启ADCB比较中断
 ** \param [in] none
 ** \return  none
 ** \note	只支持比较器 0 
*****************************************************************************/
void ADCB_EnableCompareInt(void);
/*****************************************************************************
 ** \brief	ADCB_DisableCompareInt
 **			关闭ADCB比较中断
 ** \param [in] none
 ** \return  none
 ** \note	只支持比较器 0 
*****************************************************************************/
void ADCB_DisableCompareInt(void);
/*****************************************************************************
 ** \brief	ADCB_GetCompareIntFlag
 **			获取ADCB比较中断使能并且产生中断标志位
 ** \param [in] none
 ** \return  1:中断使能并且产生中断 0：无中断
 ** \note	只支持比较器 0 
*****************************************************************************/
uint32_t ADCB_GetCompareIntFlag(void);
/*****************************************************************************
 ** \brief	ADCB_ClearCompareIntFlag
 **			清除ADCB比较中断标志位
 ** \param [in] none
 ** \return  none
 ** \note	只支持比较器 0 
*****************************************************************************/
void ADCB_ClearCompareIntFlag(void);

/*****************************************************************************
 ** \brief	ADCB_EnableChannelInt
 **			开启ADCB通道n中断
 ** \param [in]ChannelMask: ADCB_CH_0_MSK ~ ADCB_CH_30_MSK
 ** \return  none
 ** \note	
*****************************************************************************/
void ADCB_EnableChannelInt(uint32_t ChannelMask);
/*****************************************************************************
 ** \brief	ADCB_DisableChannelInt
 **			关闭ADCB通道n中断
 ** \param [in] ChannelMask: ADCB_CH_0_MSK ~ ADCB_CH_30_MSK
 ** \return  none
 ** \note	
*****************************************************************************/
void ADCB_DisableChannelInt(uint32_t ChannelMask);
/*****************************************************************************
 ** \brief	ADCB_GetChannelIntFlag
 **			获取ADCB通道n中断使能并且产生中断标志位
 ** \param [in] Channel:ADCB_CH_0 ~ ADCB_CH_30
 ** \return  1:中断使能并且产生中断 0：无中断
 ** \note	
*****************************************************************************/
uint32_t ADCB_GetChannelIntFlag(uint32_t Channel);
/*****************************************************************************
 ** \brief	ADCB_ClearChannelIntFlag
 **			清除ADCB通道n中断标志位
 ** \param [in] Channel:ADCB_CH_0 ~ ADCB_CH_30
 ** \return  none
 ** \note	
*****************************************************************************/
void ADCB_ClearChannelIntFlag(uint32_t Channel);


// 用户部分对外






#ifdef __cplusplus
}
#endif

#endif /* __ADCB_H_ */

